<?php

include ("include/config.php");


stemplate::assign("_page_title", "Products");
stemplate::assign("main_categories", core_categories());


require($config['basedir']."/classes/category.class.php");
$post = $_REQUEST;
$obj_cat = new Category();

$_action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';

switch($_action) {

	case 'add':
   	break;
	
	case 'view':
	default:
  		stemplate::assign("post", $post);
		stemplate::assign('category', $obj_cat->getCategoryById($post));
		stemplate::assign('child_categories', $obj_cat->getChildCategories($post));
		stemplate::assign('products', $obj_cat->getProductsByCategoryById($post));
		stemplate::display("category.tpl");
    break; 

}




?>